<style>
.js-address-ul{margin-left: -50px;}
.js-address-ul li{
    list-style: none;
    float: left;
    margin-left: 10px;
    height: 25px;
    background: #ccc;
    line-height: 25px;
    padding: 0 10px;
}    
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('任务酬劳')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-task_title" data-rule="required" class="form-control" name="row[task_title]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('素材设计图')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-sj_img" data-rule="required" class="form-control" size="50" name="row[sj_img]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-sj_img" class="btn btn-danger plupload" data-input-id="c-sj_img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-sj_img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-sj_img" class="btn btn-primary fachoose" data-input-id="c-sj_img" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-sj_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-sj_img"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('效果图')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-xg_img" data-rule="required" class="form-control" size="50" name="row[xg_img]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-xg_img" class="btn btn-danger plupload" data-input-id="c-xg_img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-xg_img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-xg_img" class="btn btn-primary fachoose" data-input-id="c-xg_img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-xg_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-xg_img"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Push_position')}:</label>
        <div class="col-xs-12 col-sm-8">  
            侧面 后档
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('任务周期')}:</label>
        <div class="col-xs-12 col-sm-2">
            <select  id="c-push_position" data-rule="required" class="form-control selectpicker" name="row[show_time]">
                <?php for($i=1;$i<=4;$i++):?>
                    <option value="{$i}">{$i}周</option>
                <?php endfor;?>
            </select>
<!--            <input id="c-show_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[show_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Task_price')}(元):</label>
        <div class="col-xs-12 col-sm-5">
            <input id="c-task_price" data-rule="required" class="form-control js-task-price" name="row[task_price]" type="text" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Task_num')}(份):</label>
        <div class="col-xs-12 col-sm-5">
            <input id="c-task_num" data-rule="required" class="form-control js-task-num" name="row[task_num]" type="text" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('车辆品牌要求')}:</label>
        <div class="col-xs-12 col-sm-8 js-check">
            <p class="text-muted"><input type="checkbox" name="row[brand][]" value="0" class="js-all"/> <label for="checkall"><small>不限</small></label></p>
            <div class="js-show-brand-cont">
                <a href="javascript:;" class="js-show-brand-ck">选择品牌(<span class="js-show-txt">展开</span>)</a><br/>
                <div class="js-show-brand-list" style="display:none;">
                    <?php foreach($brandList as $val):?>
                    <span class="text-muted"><input type="checkbox" name="row[brand][]" value="{$val['car_brand_id']}" class="js-single"/> <label for="checkall"><small>{$val['brand_name']}</small></label></span>
                    <?php endforeach;?>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('车型要求')}:</label>
        <div class="col-xs-12 col-sm-8 js-check">
            <p class="text-muted"><input type="checkbox" name="row[type][]" value="0" class="js-all"/> <label for="checkall"><small>不限</small></label></p>
            <div class="js-show-type-cont">
                <a href="javascript:;" class="js-show-type-ck">选择车型(<span class="js-show-txt">展开</span>)</a><br/>
                <div class="js-show-type-list" style="display:none;">
                    <?php foreach($typeList as $val):?>
                    <span class="text-muted"><input type="checkbox" name="row[type][]" value="{$val['car_type_id']}" class="js-single"/> <label for="checkall"><small>{$val['type_name']}</small></label></span>
                    <?php endforeach;?>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('车身颜色要求')}:</label>
        <div class="col-xs-12 col-sm-8 js-check">
            <p class="text-muted"><input type="checkbox" name="row[color][]" value="0" class="js-all"/> <label for="checkall"><small>不限</small></label></p>
            <div class="js-show-color-cont">
                <a href="javascript:;" class="js-show-color-ck">选择颜色(<span class="js-show-txt">展开</span>)</a><br/>
                <div class="js-show-color-list" style="display:none;">
                    <?php foreach($colorList as $val):?>
                    <span class="text-muted"><input type="checkbox" name="row[color][]" value="{$val['car_color_id']}" class="js-single"/> <label for="checkall"><small>{$val['color_name']}</small></label></span>
                    <?php endforeach;?>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('投放区域')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div>
                <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area" style="float:left;">
                    <select class="province form-control js-province" name="province" data-url="ajax/area"></select>
                    <select class="city form-control js-city" name="city" data-url="ajax/area"></select>
                    <select class="area form-control js-area" name="area" data-url="ajax/area"></select>
                </div>
                <a href="javascript:;" class="btn js-address-add" title="添加"><i class="fa fa-plus"></i> 添加</a>
            </div>
            <p>
            <ul class="js-address-ul">
                
            </ul>
           <input id="c-address_list" data-rule="required" class="form-control js-address_list" name="row[address_list]" type="text" value="" style="display:none;">
<!--            <textarea id="c-address_list" data-rule="required" class="form-control " rows="5" name="row[address_list]" cols="50"></textarea>-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Get_start_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-get_start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[get_start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Get_end_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-get_end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[get_end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sk_start_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-sk_start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sk_start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
            <span style="color:red;">(上刊时间必须为领取结束时间3天后开始)</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sk_end_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-sk_end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sk_end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('上刊网点')}:</label>
        
        <div class="col-xs-12 col-sm-8">
            <?php foreach($positionList as $val):?>
            <span class="text-muted"><input type="checkbox" name="row[position_ids][]" value="{$val['position_id']}"/> <label for="checkall"><small>{$val['position_name']}</small></label></span>
            <?php endforeach;?>
        </div>
    </div>
   <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Task_desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea name="row[task_desc]" id="c-task_desc" cols="50" rows="5" class="form-control editor"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('提交审核')}</button>
<!--            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>-->
            <div style="width: 320px; color: #999;">
                <div><b>任务费：</b><span class="js-task-total">0.00</span>元<div>
                <span>任务费=酬金x任务数+￥50.00x任务数（制作费）<span>
                <?php if($onoff_first_price == 1):?>
                <span>首次发布任务成功，奖励￥500.00</span>
                <?php endif;?>
            </div>
            
        </div>
    </div>
</form>
